package com.yn.xgame.message;

import java.util.function.Consumer;

/**
 * 带一个参数调用消息
 * Created by wangboo on 2017/7/11.
 */
public class Func1Message<T> implements IFuncMessage {

    private T t;
    private Consumer<T> consumer;

    public Func1Message(T t, Consumer<T> consumer) {
        this.t = t;
        this.consumer = consumer;
    }

    @Override
    public void apply() {
        consumer.accept(t);
    }
}
